package com.example.function.sys.model.pojo;


import com.example.common.support.ApplicationContextProvider;
import com.example.function.sys.model.one.SysDepartment;
import com.example.function.sys.service.ISysDepartmentService;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 * Description: <SysDepartmentPojo vo>. <br>
 * <p>
 * generate time:2021-7-22 10:43:22
 *
 * @author hanqf
 * @version V1.0
 */
@Data
public class SysDepartmentPojo implements Serializable {
    private static final long serialVersionUID = 1L;

    /*
     * 部门id
     */
    private Long id;


    /*
     * 部门名称
     */
    private String departName;


    /**
     * 实体对象复制到数据对象
     */
    public static SysDepartmentPojo wrapper(SysDepartment sysDepartment) {
        SysDepartmentPojo sysDepartmentPojo = new SysDepartmentPojo();
        BeanUtils.copyProperties(sysDepartment, sysDepartmentPojo);
        final ISysDepartmentService sysDepartmentService = (ISysDepartmentService) ApplicationContextProvider.getBean("sysDepartmentService");

        return sysDepartmentPojo;
    }

}



